package com.twu.biblioteca;


import java.io.PrintWriter;

/**
 * Created by neilbo on 8/01/2014.
 */
public class Movie {
    private String title;
    private int year;
    private String director;
    private int rating;
    private int maxRating = 10;
    private PrintWriter printWriter;

    public Movie(String title, int year, String director, int rating) {

        this.title = title;
        this.year = year;
        this.director = director;
        this.rating = rating;
    }

    public String getTitle() {
        return title;
    }


    public int getYear() {
        return year;
    }

    public String getDirector() {
        return director;
    }

    public String getRating() {
        if (this.rating == -1){
            return "Not a valid Rating";
        }
        return (this.rating +"/"+ this.maxRating);

    }

    public String getInfo() {
        return (this.getTitle() +", "+ this.getYear() + ", " + this.getDirector() + ", " + this.getRating());
    }
}
